package com.zgm.ch06.aop.xml.simple._3_1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.zgm.ch06.aop.services.StockService;
import com.zgm.ch06.aop.services.UserService;

public class XmlDemo {

	public static void main(String[] args) {
		ApplicationContext ac = new ClassPathXmlApplicationContext("com/zgm/ch06/aop/xml/simple/_3_1/_3_1-context.xml");
		
		UserService userService = (UserService) ac.getBean("userService");
		StockService stockService = (StockService) ac.getBean("stockService");
		
		userService.login("zgm");
		stockService.getStockLevel("A");
	}
}
